Proving Pointer Program Properties. Part 1: Context and overview

نویسنده

  • Bertrand Meyer
چکیده

Efforts to reason formally about programs, and in particular to prove their properties mathematically, have no practical value unless they can handle all the language facilities on which realistic programs depend. It is then not surprising that one of the biggest obstacles to the spread of such correctness-guaranteeing methods has been the lack of a good way to model the highly dynamic nature of the run-time structures created by object-oriented programs — and by most plain C or Pascal programs — with their heavy use of pointers, or references, from object to object. The present discussion proposes a mathematical theory for modeling pointer-rich object structures and proving their properties. The model only uses simple concepts from set theory: sets, relations, functions, composition, restriction, image. For run-time operations all it needs is the notion of event, a function yielding a new program state from an existing one. The model has two principal applications: • The coarse-grained version of the model, considering only the existence or not of a reference between an object and another, gives a basis for discussing overall properties of the object structure, defining as a result the correctness constraints of memory management and especially garbage collection, full or incremental. Mathematically, this model uses a binary relation. • The fine-grained version, based on functions which together make up the relation of the coarse-grained version, integrates the properties of individual object fields. As a result, it allows proving the correctness of classes describing structures with luxurious pointer foliage, from linked lists and graphs to B-trees and double-ended queues. This is part of a series of 3 articles. Parts 2 and 3 will be published in the May-June 2003 issue of JOT.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

The Verification Grand Challenge and Abstract Interpretation

Interpretation is a theory of approximation of mathematical structures, in particular those involved in the semantic models of computer systems [4,10,11]. Abstract interpretation can be applied to the systematic construction of methods and effective algorithms to approximate undecidable or very complex problems in computer science. The scope of application is rather large e.g. from type inferen...

متن کامل

Cobalt: A Language for Writing Provably-Sound Compiler Optimizations

We overview the current status and future directions of the Cobalt project. Cobalt is a domainspecific language for implementing compiler optimizations as guarded rewrite rules. Cobalt optimizations operate over a C-like intermediate representation including unstructured control flow, pointers to local variables and dynamically allocated memory, and recursive procedures. The design of Cobalt en...

متن کامل

Automatically Verifying Temporal Properties of Pointer Programs with Cyclic Proof

We propose a deductive reasoning approach to the automatic verification of temporal properties of pointer programs, based on cyclic proof. We present a proof system whose judgements express that a program has a certain temporal property over memory state assertions in separation logic, and whose rules operate directly on the temporal modalities as well as symbolically executing programs. Cyclic...

متن کامل

Testing Program Verification Techniques and Input Space Partitioning

1. Prove correctness This approach requires writing exhaustive, precise formal specifications (preconditions, postconditions, and usually loop invariants), then proving that these specifi­ cations are satisfied by the code and its environment. The proof can be performed by hand, but for non-trivial programs, the proofs are long and tedious and humans are prone to errors, so theorem-proving soft...

متن کامل

Simplifying Pointer Kleene Algebra

Pointer Kleene algebra has proved to be a useful abstraction for reasoning about reachability properties and correctly deriving pointer algorithms. Unfortunately it comes with a complex set of operations and defining (in)equations which exacerbates its practicability with automated theorem proving systems but also its use by theory developers. Therefore we provide an easier access to this appro...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • Journal of Object Technology

دوره 2  شماره 

صفحات  -

تاریخ انتشار 2003